<form action="" class="form-horizontal" role="form">
  <div class="form-group">
		<label class="col-sm-2 control-label">排序</label>
		<div class="col-sm-1">
			<input type="number" class="form-control" name="sort" placeholder="" datatype="n" value="{$distributionShopConfig.sort}"/>
		</div>
  </div>
  
  <div class="form-group">
		<label class="col-sm-2 control-label">图标</label>
		<div class="col-sm-5">
	      <input type="text" class="form-control margin-bottom" name="icon" id="icon" placeholder="请上传图标" value="{$distributionShopConfig.icon}"> 
	      <span class="btn btn-primary" id="upload-image">上传图片</span>
		</div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">名称</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="name" placeholder="请输入名称" datatype="*" value="{$distributionShopConfig.name}"/>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">内容</label>
    <div class="col-sm-6">
      <script id="content" type="text/plain">{$distributionShopConfig.content}</script>
    </div>
  </div>
  
  <div class="form-group">
    <label class="col-sm-2 control-label">状态</label>
    <div class="col-sm-6">
       {$distributionShopConfig.status}
    </div>
  </div>
  
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-8">
    	<a class="btn btn-default" onclick="javascript:history.go(-1)">返回上页</a>
		<a class="btn btn-default" onclick="self.location=document.referrer">返回上页并刷新</a>
      <input type="hidden" name="id" value="{$distributionShopConfig.id}"/>
      <button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/savePost">保存更改</button>
    </div>
  </div>
</form>

<!-- ueditor -->
<link rel="stylesheet" href="/ue/themes/default/css/ueditor.min.css">
<script type="text/javascript" src="/ue/ueditor.config.js"></script>
<script type="text/javascript" src="/ue/ueditor.all.js"></script>
<script type="text/javascript">
  window.UEDITOR_HOME_URL = "/ue/";
    var editor = UE.getEditor("content", {
      initialFrameWidth: "100%",
      initialFrameHeight: 300,
      textarea: "content"
    });
</script>

<!-- uploadify -->
<link rel="stylesheet" href="__PUBLIC__/Style/Common/uploadify/uploadify.css">
<script type="text/javascript" src="__PUBLIC__/Style/Common/uploadify/jquery.uploadify.min.js?{:rand(0,9999)}"></script>
<script type="text/javascript">
  $("#upload-image").uploadify({
    'multi'            :  true,
    'buttonClass'      :  'margin-bottom',
    'fileSizeLimit'    :   '200kb',
    'buttonText'       :  '上传图片',
    'fileTypeDesc'     :   'Image Files',
    'fileTypeExts'     :   '*.jpg; *.png',
    'swf'              :   '__PUBLIC__/Style/Common/uploadify/uploadify.swf',
    'uploader'         :   '__MODULE__/Upload/uploadOne',
    'onUploadStart'    :  function(){},
    'onUploadSuccess'  : function( data, res ) {
      var url = eval("(" + res + ")").extra.url;
      $("#icon").val( url );  
    }
  });
</script>